/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.employee.entity;

import org.hibernate.validator.constraints.Length;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;
import com.thinkgem.jeesite.modules.sys.entity.Office;

/**
 * 公共假期Entity
 * @author hui.li
 * @version 2017-07-18
 */
public class StatutoryHolidays extends DataEntity<StatutoryHolidays> {
	
	private static final long serialVersionUID = 1L;
	private Office company;		// 国家	
	private String name;		// 节日名称
	private Date date;		// 日期
	private Date beginDate;		// 开始 日期
	private Date endDate;		// 结束 日期
	
	public StatutoryHolidays() {
		super();
	}

	public StatutoryHolidays(String id){
		super(id);
	}

	@NotNull(message="国家不能为空")
	@ExcelField(title="国家", type=0, align=2, sort=1)
	public Office getCompany() {
		return company;
	}

	public void setCompany(Office company) {
		this.company = company;
	}
	
	@Length(min=1, max=200, message="节日名称长度必须介于 1 和 200 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@NotNull(message="日期不能为空")
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
		
}